<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
  </head>
  <body>
    <div id="app">
      <p>总积分:{{members[0].score + members[1].score + members[2].score + members[3].score}}</p>
      <p>总积分: {{totalScore}}</p>
    </div>

    <script src="../js/vue.js"></script>

    <script>
      const app = Vue.createApp({
        data() {
          return {
            members: [
               {id: 'Lk001', name: '张三', score: 13232},
               {id: 'Lk002', name: '小撩', score: 14232},
               {id: 'Lk003', name: '大撩', score: 15232},
               {id: 'Lk004', name: '李四', score: 16237}
             ]
          }
        },
        computed:{
          totalScore(){
            let total = 0;
            for(let member of this.members){
              total += member.score;
            }
            return total;
          }
        }
      }).mount("#app");
    </script>
  </body>
</html>